package com.mgface.springcloud.controller;

import com.mgface.springcloud.feign.ServerFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project springcloudCollection
 * @create 2018-08-16 11:37
 **/
@RestController
public class FeignController {
    @Autowired
    private ServerFeign feign;
    @Value("${mgface.secret}")
    private String secret;

    @GetMapping("/say")
    public String say() {
        System.out.println("secret--->" + secret);
        return feign.hello("admin");
    }
}
